package com.epalmpay.service.activity;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.epalmpay.dto.activity.CouponAddInDTO;
import com.epalmpay.dto.activity.CouponDetailOutDTO;
import com.epalmpay.dto.activity.CouponInDTO;
import com.epalmpay.dto.activity.CouponListOutDTO;
import com.epalmpay.dto.activity.RedPackageDetailOutDTO;
import com.epalmpay.dto.activity.RedPackageInDTO;
import com.epalmpay.dto.activity.RedPackageListOutDTO;
import com.epalmpay.dto.activity.RedPackageOutDTO;
import com.epalmpay.dto.activity.RedpackageAddInDTO;
import com.epalmpay.entity.Coupon;
import com.epalmpay.entity.Page;
import com.epalmpay.entity.Redpackage;

/***
 * 活动之-红包服务类
 * @author tonywu
 *
 */
public interface IActivityRedPackageService {
	
	/**获得红包列表
	 * @param redPackageInDTO
	 * @return
	 * @throws Exception
	 */
	public List<RedPackageOutDTO> getRedPackageList(RedPackageInDTO redPackageInDTO,Page page) throws Exception;

	public RedPackageListOutDTO getRedPackageList(RedPackageInDTO redPackageInDTO) throws Exception;

	//根据purposeid获取不同的红包列表
    List<RedPackageOutDTO> GetSpecialRedpackageList(RedPackageInDTO redPackageInDTO) throws Exception;
    
    public RedPackageListOutDTO  getToIndexData(RedPackageInDTO redPackageInDTO) throws Exception;
 
    public int  saveRedpackage(RedpackageAddInDTO redpackageAddInDTO,String url) throws Exception;
    
    public RedPackageDetailOutDTO  getRedpackageDetail(RedPackageInDTO inDTO,Page page) throws Exception;

    //去发红包
	public List<Redpackage> redPackageList(Redpackage redpackage) throws Exception;
	//获取红包的数量
	public Redpackage findById(RedPackageInDTO redPackageInDTO);

	//档红包个数小于要发的数量时 更新红包表
	public void updateRedPackage(Redpackage redpackage);
	

    List<Map> getRedpackageListById(Set<Long> redpackageIdSet);

    //结束红包
	public int endRedpackage(Long redpackageId) throws Exception;
	//结束所有的红包
    public void endExpireAllRedpackage() throws Exception;

	//会员领取红包
	public int insertRedpackageUser(String memberId, String redpackageUserId) throws Exception;

	public RedPackageOutDTO queryRedpackageForEdit(Long redpackageId) throws Exception;
	public int editRedpackage(RedPackageInDTO inDTO) throws Exception;
}
